	package com.tecsoluction.transportecerto;

import com.tecsoluction.transportecerto.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

public class TransporteCertoSplash extends Activity implements Runnable{
	
	ProgressBar progressBar;
	Handler handler;
	private int progressStatus=0;
		
	 @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.splash_layout);
	        progressBar= (ProgressBar) findViewById(R.id.progressbar);	        handler = new Handler();
	        handler.postDelayed(this, 2400);
	        new Thread(new Runnable() {
	             public void run() {
	                 while (progressStatus < 2300 ) {
	                    progressStatus++;
	                    progressBar.setProgress(progressStatus);
	                    
	                     // Update the progress bar
	                     handler.post(new Runnable() {
	                         public void run() {
	     	                    progressBar.incrementProgressBy(progressStatus);
	    	                    progressBar.setProgress(progressStatus);

	                        
	                         }
	                     });
	                 }
	             }
	         }).start();
	     }       
	    		
	public void run() {
					startActivity(new Intent(getBaseContext(), PrincipalActivity.class));
			finish();
		
		}
}
		

